The Toi invasion (Japanese: 刀伊の入寇 toi no nyūkō) was the invasion of northern Kyūshū by Jurchen pirates in 1019. Toi (되, Doe) meant barbarian in the Korean language at the time.
Sailing in about 50 ships from direction of Goryeo, the Toi pirates assaulted Iki, Tsushima and then Hakata Bay. Using Noko Island (能古島 noko no shima) in the bay as the base, for a week they despoiled villages and kidnapped Japanese people for use as slaves. At that time, Dazaifu, the administrative center of Kyūshū. He raised soldiers and successfully drove them away.
Three enemies were captured by Japanese army in Matsura, but they were identified as Koreans. They said that they had guarded the borderland but had been captured by the Toi. However, Japanese officers suspected them because there had been some Korean pirates in the former Silla period. But, after Nakamine no Mochitaka's report who smuggled himself in to Goryeo, this suspicion was resolved. A few months later, the Goryeo delegate Jeong Jaryang (鄭子良) reported that Goryeo forces attacked the pirates off Wŏnsan and rescued about 260 Japanese. The Korean government then repatriated them to Japan. There remain detailed reports by two captive women, Kura no Iwame and Tajihi no Akomi.
These Jurchen pirates lived in what is today Hamgyŏngdo, North Korea. They frequently attacked the eastern coast of the Korean peninsula. In particular, Ulleungdo was abandoned because of their massive attacks. The invasion in 1019 was one of those incidents.